package org.simple.jdbc.statement;

import org.simple.jdbc.statement.annotation.Delete;
import org.simple.jdbc.statement.annotation.Insert;
import org.simple.jdbc.statement.annotation.Select;
import org.simple.jdbc.statement.annotation.Update;

import java.util.List;

/**
 * @author jinchengzhen
 */
public interface BaseStatement<T> {
    @Insert
    boolean insert(T t);

    @Update
    boolean updateById(T t);

    @Delete
    boolean deleteById(Object id);

    @Select
    T selectById(Object id);

    @Select
    List<T> selectAll();
}
